package dwl.graduation.design.domain;

public enum TaskStep {
    DEPARTMENT("部门负责人审批",(short)0),
    PO("PO对接人审批",(short)1),
    SENIORPO("PO负责人审批",(short)2),
    SUCCESS("流程结束，同意",(short)3),
    FAIL("流程结束,拒绝",(short)4);
    private String name;
    private Short index;

    private TaskStep(String name,Short index){
        this.name = name;
        this.index = index;
    }

    public static String getName(Short index){
        for(TaskStep step:TaskStep.values()){
            if(step.getIndex().equals(index)){
                return step.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Short getIndex() {
        return index;
    }
    public void setIndex(Short index) {
        this.index = index;
    }
}
